<template>
  <div class="login-container">
    <!-- 注册的盒子 -->
    <div class="login-box">
      <!-- 标题的盒子 -->
      <div class="title-box"></div>
      <!-- 注册的表单区域 -->
      <!-- el-form
      :model :指向收集的表单的数据对象
      :rules :指向表单的验证规则对象,存储了所有的验证规则
       -->
      <el-form class="login">
        <el-form-item>
          <el-input
            placeholder="请输入用户名"
            prefix-icon="el-icon-user"
          ></el-input>
        </el-form-item>
        <el-form-item prop="password">
          <el-input
            placeholder="请输入密码"
            prefix-icon="el-icon-lock"
          ></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" style="width: 100%">登录</el-button>
          <el-link type="info" :underline="false">去注册</el-link>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
    data() {
        return {
            property: 'value',
        };
    },
};
</script>

<style lang="less" scoped>
// scoped: 防止样式冲突 ,生成文件作用域
// 此处的css样式只能在当前文件生效
.login-container {
  background: url("../../assets/images/login_bg.jpg") center;
  background-size: cover;
  height: 100%;

  .login-box {
    width: 400px;
    height: 280px;
    background-color: #fff;
    border-radius: 3px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    .title-box {
      height: 60px;
      background: url("../../assets/images/login_title.png") center no-repeat;
    }
    .login {
      padding-left: 20px;
      padding-right: 20px;
    }
  }
}
</style>